/**
 * 
 */
package at.ac.tuwien.swa075.telco.auc.dao;

import at.ac.tuwien.swa075.telco.auc.AucException;

/**
 * @author Johannes Mayr <johannes.mayr@chello.at>
 * 
 */
public interface IProfileDAO {
	/**
	 * Deletes an existing profile
	 * 
	 * @param profile
	 *            The profile to delete.
	 * @return true if the profile was deleted.
	 * @throws AucException
	 *             An error occured while deleting the profile.
	 */
	public boolean deleteProfile(ProfileTO profile) throws AucException;

	/**
	 * Lookup a single profile entry identified by a subscriber id.
	 * 
	 * @param imsi
	 *            The international mobile subscriber id.
	 * @return The profile.
	 * @throws BCException
	 *             An error occured during lookup.
	 */
	public ProfileTO findProfile(String imsi) throws AucException;

	/**
	 * Creates a new profile with the given profile data.
	 * 
	 * @param profile
	 *            The profile object.
	 * @return Returns the profile id number.
	 * @throws AucException
	 *             An error occured while creating a new profile
	 */
	public long insertProfile(ProfileTO profile) throws AucException;

	/**
	 * Updates the data of an existing profile.
	 * 
	 * @param account
	 *            The profile object.
	 * @return Returns true if data was changed.
	 * @throws AucException
	 *             An error occured while updating the data.
	 */
	public boolean updateProfile(ProfileTO profile) throws AucException;

}
